package com.itheima.stock.mapper;

import com.itheima.stock.common.domain.ScreenDklineDomain;
import com.itheima.stock.common.domain.ScreenTimeSharinDomain;
import com.itheima.stock.common.domain.StockIncreaseDomain;
import com.itheima.stock.pojo.StockRtInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author WanWangLei
* @description 针对表【stock_rt_info(个股详情信息表)】的数据库操作Mapper
* @createDate 2022-01-08 19:37:46
* @Entity com.itheima.stock.pojo.StockRtInfo
*/
@Mapper
public interface StockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockRtInfo record);

    int insertSelective(StockRtInfo record);

    StockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockRtInfo record);

    int updateByPrimaryKey(StockRtInfo record);

    List<StockIncreaseDomain> stockIncreaseLimit();

    List<StockIncreaseDomain> stockAll();

    List<Map> getUpDownCount(@Param("avlDate") String avlDate, @Param("flag") Integer i);

    List<Map> stockUpDownScopeCount(@Param("avlDate") String avlDate);

    List<ScreenTimeSharinDomain> stockScreenTimeSharing(@Param("code") String code, @Param("avlDate") String avlDate);

    List<ScreenDklineDomain> stockCreenDkLine(@Param("code") String code, @Param("forwardDate") Date forwardDate);

    int insertBatch(@Param("items") ArrayList<StockRtInfo> list);
}
